﻿using System;

namespace PD.DataAccess
{
    /// <summary>
    /// Provides data for entity inserted event.
    /// </summary>
    /// <typeparam name="T">Type of inserted entity.</typeparam>
    public class EntityInsertedEventArgs<T> : EventArgs where T : EntityBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="EntityInsertedEventArgs&lt;T&gt;"/> class.
        /// </summary>
        /// <param name="entity">The entity.</param>
        public EntityInsertedEventArgs(T entity)
        {
            this.InsertedEntity = entity;
        }

        /// <summary>
        /// Gets the inserted entity.
        /// </summary>
        public T InsertedEntity { get; private set; }
    }
}
